import request from '@/utils/request'



// 查询电档案列表
export function listElectricityTerminalsXbAll(query) {
  return request({
    url: '/basedata/electricityTerminalsXb/listAll',
    method: 'get',
    params: query
  })
}





// 查询电档案列表
export function listElectricityTerminalsXb(query) {
  return request({
    url: '/basedata/electricityTerminalsXb/list',
    method: 'get',
    params: query
  })
}

// // 查询电档案列表
export function listElecTerminalXb(query) {
  return request({
    url: '/basedata/electricityTerminalsXb/terminalList',
    method: 'get',
    params: query
  })
}


// // 查询电档案列表
export function listElecTerminalXbForGJ(query) {
  return request({
    url: '/basedata/electricityTerminalsXb/terminalListForGJ',
    method: 'get',
    params: query
  })
}




// 查询电档案详细
export function getElectricityTerminalsXb(id) {
  return request({
    url: '/basedata/electricityTerminalsXb/' + id,
    method: 'get'
  })
}

// 新增电档案
export function addElectricityTerminalsXb(data) {
  return request({
    url: '/basedata/electricityTerminalsXb',
    method: 'post',
    data: data
  })
}

// 修改电档案
export function updateElectricityTerminalsXb(data) {
  debugger
  return request({
    url: '/basedata/electricityTerminalsXb',
    method: 'put',
    data: data
  })
}

// 删除电档案
export function delElectricityTerminalsXb(id) {
  return request({
    url: '/basedata/electricityTerminalsXb/' + id,
    method: 'delete'
  })
}

// 远程控制
export function remoteControl(data){
  return request({
    url:'/basedata/electricityTerminalsXb/createCommand',
    method: 'post',
    params: data
  })
}

// 单表注册
export function registerSingle(data){
  return request({
    url:'/basedata/electricityTerminalsXb/createGuoXinDeviceInAep',
    method: 'post',
    params: data
  })
}

// 根据locationNb查户表档案详情
export function getByLocationNb(locationNb){
  return request({
    url: '/basedata/electricityTerminalsXb/getByLocationNb?locationNb=' + locationNb,
    methods: 'get',
  })
}

// 换表
export function changeTerminalXb(data){
  return request({
    url: '/basedata/electricityTerminalsXb/changeTerminalXb',
    method: 'post',
    data: data,
  })
}
// 表过户
export function changeTerminalUser(data,terminalId, newUser) {
  return request({
    url: '/basedata/electricityTerminalsXb/changeTerminalUser/' + terminalId + '?newUser=' + newUser,
    method: 'post',
    data: data,
  })
}
